package com.jiepu.daily.corejava.advanceed.part1.day0714.innerclass;

/**
 * @Description:
 * @author: xinjie.txt
 * @date: 2020/7/14  14:42
 */
public class Outer {
	static {
		String name = "xinjie.txt";
		System.out.println("class Outer is loaded...");

	}

	/**
	 * @description: 最低权限的内部类，对外完全隐藏
	 * @author: xinjie.txt
	 * @date: 2020/7/14 14:43
	 */
	private static class Inner {
		static {
			System.out.println("class Inner is loaded...");
		}

		public int addd(int a, int b) {
			return a + b;
		}

	} // com.jiepu.daily.corejava.advanceed.chapter1.day0714.innerclass.Outer.Inner



	public static void main(String[] args) {
		/**
		 * 创建对象 ， 触发Inner类的加载
		 */
		Inner inner = new Inner();
		int result = inner.addd(5, 9);

		System.out.println(result);
	}
}
